package com.lh.exception;

import com.lh.base.ResResultCode;

/**
 * 自定义异常类  用来抛出业务异常
 */
public class BizException extends RuntimeException {

    private ResResultCode resResultCode;
    private String message;

    public BizException(ResResultCode resResultCode) {
        this.resResultCode = resResultCode;
    }

    public BizException(ResResultCode resResultCode, String message) {
        this.resResultCode = resResultCode;
        this.message = message;
    }

    public ResResultCode getResResultCode() {
        return resResultCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
